﻿<template>

  <!-- 愿望方案 s -->
  <div class="wish_scheme_container">
    <!--header-->
    <!--<div class="wish_header" ref="wish_header">-->
      <!--<img src="../../static/img/back_ccc.png" class="back_c" v-on:click="go_back"/>-->
      <!--<span class="wish_header_n">-->
            <!--添加方案-->
          <!--</span>-->
    <!--</div>-->
    <header_nav :header_name="header_name" :go_back_flag='true'></header_nav>
    <!--header-->
  <div class="input_wish_header">
    <div class="input_wish_header_header">
      方案
    </div>
    <div class="input_wish_header_n clearfix">
      <!--<div class="input_wish_header_left clearfix">-->
        <!--<img src="../../static/img/bg_all.png" class="image_n">-->
        <!--<p class="input_wish_header_left_id">-->
          <!--12345678-->
        <!--</p>-->
        <!--<p class="input_wish_header_left_name">-->
          <!--啊啊啊-->
        <!--</p>-->
      <!--</div>-->

      <div class="input_wish_header_right">
        <div class="input_wish_header_title_inner">
          <span style="margin-left:3vw;">方案描述</span>
        </div>
        <textarea class="input_wish_main" ref="input_wish_main">

              </textarea>
      </div>

    </div>

    <div class="wish_need">
      <div class="wish_need_header">
        <span style="margin-left:3vw;">方案所需</span>
      </div>
      <div style="text-align:left;height:4vw;line-height:4vw;margin-top:2vw;">
              <span style="color:#6d6d6d;font-size:2.5vw;margin-left:3.2vw;">
                技能：<input type="text" name="name" value="" style="border:0;" ref="skill"/>
              </span>
      </div>
      <div style="text-align:left;height:4vw;line-height:4vw;margin-top:2vw;">
              <span style="color:#6d6d6d;font-size:2.5vw;margin-left:3.2vw;">
                资源：<input type="text" name="name" value="" style="border:0;" ref="res"/>
              </span>
      </div>
      <div style="text-align:left;height:4vw;line-height:4vw;margin-top:2vw;">
              <span style="color:#6d6d6d;font-size:2.5vw;margin-left:3.2vw;">
                其他：<input type="text" name="name" value="" style="border:0;" ref="other"/>
              </span>
      </div>
    </div>

    <!--<div class="input_wish_header_middle_img">
      <img src="../../static/img/input_wish_input_img.png" class="input_wish_input_img">
    </div>-->
    <!--<div class="input_wish_header_bottom">
      <div class="input_wish_header_b_btn input_wish_header_b_btn_1">
        取消
      </div>
      <div class="input_wish_header_b_btn input_wish_header_b_btn_2">
        确认
      </div>
    </div>-->
  </div>
    <div class="upload_btn" v-on:click="add_wish_s"> 提交</div>
  </div>
  <!-- 愿望方案 e -->

</template>

<script>
  import {mapState, mapMutations,mapActions,mapGetters} from 'vuex';
  import { Toast, Indicator } from 'mint-ui';
  import qs from 'qs';
  import Vue from "vue";
  import axios from 'axios'
  import common from "../common/common.js"
  import header_nav from "../common/header_other/Header_other.vue"
  Vue.prototype.$http = axios;
  export default {
    name: 'wx_share_temp',
    data () {
      return {
        mes:"",
        share_mask_show:false,
        header_name:"添加方案"
      }
    },
    props:["wish_list"],
    beforeCreate: function () {
      //获取用户 信息
      ///api/user / getUserById
    },
    created: function () {

    },
    methods: {
      go_back:function () {
        common.go_back_none_btn()
      },
      add_wish_s:function(){
//        /api/user/wish/addWishScheme
        Indicator.open();
        this.$http.post('/yizhiweimen/api/user/wish/addWishScheme',
            {
              'describe': this.$refs.input_wish_main.value,
              "other": this.$refs.other.value,
              "resource": this.$refs.res.value,
              "skill": this.$refs.skill.value,
              "user":{id:sessionStorage.getItem("user_id")},
              "wish":{id:sessionStorage.getItem("wish_detail_id")},
              "file":"111"
            }
          , {
            headers: {
              'Content-Type': 'application/json;charset=UTF-8'
            }
          }
        )
          .catch((thrown) => {
            Indicator.close();
          }).then((e) => {
          Indicator.close();
          Toast({
            message: "提交成功",
            position: 'bottom',
            duration: 2000
          });
          common.go_back_none_btn()
        })
      },
      share_close:function () {
        this.share_mask_show =  false;
      },
      share_show:function () {
        this.share_mask_show = true;
      },
      get_card_img:function(){
//        /api/user/withTheWindIn/selectEnvelope
      }
    },
    components: {
      header_nav
    },
    mounted: function () {
common.is_app();
    },

  }
</script>

<style scoped>
/*
  upload
*/
.upload_btn{
  width: 30vw;
  height:8vw;
  line-height: 8vw;
  border-radius: 2vw;
  font-size:4vw;
  background-color: #2aa1a5;
  color:#fff;
  text-align: center;
  margin: 5vw auto 0;
}
  /*header s*/
  .back_c{
    height:6vw;
    width:5vw;
    position:absolute;
    top:50%;
    left:1.3vw;
    transform:translateY(-50%);
  }
  .wish_header {
    height: 11.7vw;
    line-height: 11.7vw;
    color: #fff;
    font-size: 4vw;
    background-color: #9f5c2f;
    position: relative;
    text-align: left;
  }
  .wish_header_n {
    font-size: 4vw;
    color: #fff;
    padding-left: 1.7vw;
    margin-left: 5.8vw;
  }
  /*header e*/
  /*愿望s*/
  .wish_need_header {
    height: 6vw;
    line-height: 6vw;
    background-color: #dcdcdc;
    color: #6a6a6a;
    font-size: 3vw;
    border-radius: 2vw 2vw 0 0;
    text-align: left;
    color: #6c6c6c;
    font-weight:bold;
  }
  .wish_need {
    width: 82vw;
    height: 26.6vw;
    margin: 2vw auto;
    border-radius: 2vw;
    background-color: #eeeeee;
  }
  .input_wish_main {
    width: 70.2vw;
    /*height: 60vw;*/
    background-color: #eeeeee;
    border-radius: 0 0 2vw 2vw;
    height:29vw;
    resize:none;
    padding:0;
    margin:0;
    border:0;
  }

  .input_wish_header_title_inner {
    line-height: 6vw;
    height: 6vw;
    width: 100%;
    font-size: 3.5vw;
    color: #727272;
    border-radius:2vw 2vw 0 0;
    background-color: #dcdcdc;
    text-align:left;
    font-weight:bold;
  }
  .input_wish_header_n {
    margin-top: 3vw;
    padding-bottom: 3vw;
    border-bottom: 2px solid #f5f5f5;
  }
  .input_wish_header_right {
    width: 70.2vw;
    height: 35vw;
    border-radius: 2vw;
    background-color: #eeeeee;
    float: left;
    margin-left: 2.6vw;
  }
  .input_wish_header_left {
    float: left;
    margin-left: 2.6vw;
  }
  .input_wish_header_left_id {
    text-align: center;
    color: #787878;
    font-size: 2.5vw;
    line-height: 1.2;
  }
  .input_wish_header_left_name {
    color: #787878;
    font-size: 2.5vw;
    line-height:1.2;
  }
  .image_n {
    width: 12vw;
    height: 12vw;
    border-radius: 1vw;
    font-size: 2.5vw;
  }
  .input_wish_header_b_btn {
    width: 16.5vw;
    line-height: 6.4vw;
    height: 6.4vw;
    text-align: center;
    color: #fff;
    position: absolute;
    top: 50%;
    border-radius: 2vw;
    font-size: 3.5vw;
  }
  .input_wish_header_b_btn_1 {
    right: 22vw;
    transform: translateY(-50%);
    background-color: #959595;
  }
  .input_wish_header_b_btn_2 {
    right: 3.4vw;
    transform: translateY(-50%);
    background-color: #80c26a;
  }
  .input_wish_header_bottom {
    height: 9.7vw;
    line-height: 9.7vw;
    border-radius: 0 0 2vw 2vw;
    position:relative;
  }
  .input_wish_input_img {
    width: 16.9vw;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
  }
  .wish_header {
  }
  .input_wish_header_middle_img {
    height: 41.8vw;
    width: 100%;
    position: relative;
    border-bottom: 1px solid #eaeaea;
  }
  ::-webkit-input-placeholder {
    color:#fff;
  }
  /* 使用webkit内核的浏览器 */
  :-moz-placeholder {
    color: #fff;
  }
  /* Firefox版本4-18 */
  ::-moz-placeholder {
    color: #fff;
  }
  /* Firefox版本19+ */
  :-ms-input-placeholder {
    color: #fff;
  }
  /* IE浏览器 */
  .input_wish_header_header {
    border-bottom: 1px solid #eaeaea;
    height: 8.4vw;
    line-height: 8.4vw;
    text-align: center;
    color: #fff;
    font-size: 4vw;
    border-radius: 2vw 2vw 0 0;
    background-color: #9f5c2f;
  }
  .wish_container {
    height: auto;
    background-color: #eeeeee;
  }
  /*input_wish_header s*/
  .input_wish_header {
    width: 94vw;
    border-radius: 2vw;
    margin: 2.6vw auto;
    background-color: #fff;
    border-radius: 2vw;
    margin-bottom:0;
    padding-bottom:2vw;
  }
  /*input_wish_header e*/
  /*al_read_send_btn s*/
  .al_read_send_btn {
    width: 21.6vw;
    height: 7.3vw;
    line-height: 7.3vw;
    text-align: center;
    border-radius: 2vw;
    color: #fff;
    background-color: #d84848;
    display: inline-block;
    position: absolute;
    top: 50%;
    right: 4vw;
    transform: translateY(-50%);
  }
  /*愿望e*/
</style>
